<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::DecisionForest&lt; NodeType &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_decision_forest.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="classpcl_1_1_decision_forest-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::DecisionForest&lt; NodeType &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class representing a decision forest.  
 <a href="classpcl_1_1_decision_forest.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="decision__forest_8h_source.html">decision_forest.h</a>&gt;</code></p>
<div class="dynheader">
类 pcl::DecisionForest&lt; NodeType &gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpcl_1_1_decision_forest.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a6d7c620dc7d21fb4a65e6bd4d45a4b53"><td class="memItemLeft" align="right" valign="top"><a id="a6d7c620dc7d21fb4a65e6bd4d45a4b53"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest.html#a6d7c620dc7d21fb4a65e6bd4d45a4b53">DecisionForest</a> ()</td></tr>
<tr class="memdesc:a6d7c620dc7d21fb4a65e6bd4d45a4b53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a6d7c620dc7d21fb4a65e6bd4d45a4b53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30e2e3780053c9b0a25710f9c730a7ca"><td class="memItemLeft" align="right" valign="top"><a id="a30e2e3780053c9b0a25710f9c730a7ca"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest.html#a30e2e3780053c9b0a25710f9c730a7ca">~DecisionForest</a> ()</td></tr>
<tr class="memdesc:a30e2e3780053c9b0a25710f9c730a7ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a30e2e3780053c9b0a25710f9c730a7ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7b3b7be74896514d25330182cd92c60"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest.html#ad7b3b7be74896514d25330182cd92c60">serialize</a> (::std::ostream &amp;stream) const</td></tr>
<tr class="memdesc:ad7b3b7be74896514d25330182cd92c60"><td class="mdescLeft">&#160;</td><td class="mdescRight">brief Returns the number of trees in the forest.  <a href="classpcl_1_1_decision_forest.html#ad7b3b7be74896514d25330182cd92c60">更多...</a><br /></td></tr>
<tr class="separator:ad7b3b7be74896514d25330182cd92c60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac520bf8300f8166600863de95359954"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest.html#aac520bf8300f8166600863de95359954">deserialize</a> (::std::istream &amp;stream)</td></tr>
<tr class="memdesc:aac520bf8300f8166600863de95359954"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deserializes the decision tree.  <a href="classpcl_1_1_decision_forest.html#aac520bf8300f8166600863de95359954">更多...</a><br /></td></tr>
<tr class="separator:aac520bf8300f8166600863de95359954"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;class NodeType&gt;<br />
class pcl::DecisionForest&lt; NodeType &gt;</h3>

<p>Class representing a decision forest. </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="aac520bf8300f8166600863de95359954"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac520bf8300f8166600863de95359954">&#9670;&nbsp;</a></span>deserialize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class NodeType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_decision_forest.html">pcl::DecisionForest</a>&lt; NodeType &gt;::deserialize </td>
          <td>(</td>
          <td class="paramtype">::std::istream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Deserializes the decision tree. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">stream</td><td>The source for the deserialization. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;      {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keywordtype">int</span> num_of_trees;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        stream.read (<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;num_of_trees), <span class="keyword">sizeof</span> (num_of_trees));</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        this-&gt;resize (num_of_trees);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> tree_index = 0; tree_index &lt; this-&gt;size (); ++tree_index)</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;          (*this) [tree_index].deserialize (stream);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="comment">//int num_of_trees;</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="comment">//stream.read (reinterpret_cast&lt;char*&gt; (&amp;num_of_trees), sizeof (num_of_trees));</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="comment">//trees_.resize (num_of_trees);</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="comment">//for (size_t tree_index = 0; tree_index &lt; trees_.size (); ++tree_index)</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="comment">//{</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="comment">//  tree_[tree_index].deserialize (stream);</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <span class="comment">//}</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ad7b3b7be74896514d25330182cd92c60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7b3b7be74896514d25330182cd92c60">&#9670;&nbsp;</a></span>serialize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class NodeType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_decision_forest.html">pcl::DecisionForest</a>&lt; NodeType &gt;::serialize </td>
          <td>(</td>
          <td class="paramtype">::std::ostream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>brief Returns the number of trees in the forest. </p>
<p>Serializes the decision tree. </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">stream</td><td>The destination for the serialization. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;      {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">int</span> num_of_trees = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span> (this-&gt;size ());</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        stream.write (<span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;num_of_trees), <span class="keyword">sizeof</span> (num_of_trees));</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> tree_index = 0; tree_index &lt; this-&gt;size (); ++tree_index)</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;          (*this) [tree_index].serialize (stream);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="comment">//const int num_of_trees = static_cast&lt;int&gt; (trees_.size ());</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="comment">//stream.write (reinterpret_cast&lt;const char*&gt; (&amp;num_of_trees), sizeof (num_of_trees));</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="comment">//for (size_t tree_index = 0; tree_index &lt; trees_.size (); ++tree_index)</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="comment">//{</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <span class="comment">//  tree_[tree_index].serialize (stream);</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="comment">//}</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>ml/include/pcl/ml/dt/<a class="el" href="decision__forest_8h_source.html">decision_forest.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_decision_forest.html">DecisionForest</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
